<template>
  <el-dialog
    top="30px"
    width="1000px"
    append-to-body
    class="dialog-sm"
    :title="title"
    :close-on-click-modal="false"
    :before-close="beforeClose"
    :visible.sync="visible"
  >
    <main-cmpt
      v-bind="$attrs"
      :visible="visible"
      @success="handleSuccess"
      @dismiss="beforeClose"
    ></main-cmpt>
  </el-dialog>
</template>

<script>
import MainCmpt from '@/credit/views/county/unionProvince/components/dueReport/Main'

export default {
  components: {
    MainCmpt,
  },
  props: {
    visible: Boolean,
    title: {
      type: String,
      default: '尽调报告',
    },
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    beforeClose() {
      this.$emit('update:visible', false)
    },

    handleSuccess(res) {
      this.$emit('success', res)
      this.beforeClose()
    },
  },
}
</script>

<style lang="scss" scoped></style>
